/**   
 * @Title: Area.java
 * @Package com.cityoneyes.bean
 * @Description: TODO
 * @author Rick
 * @date 2011-8-4 下午11:59:29
 * @version V1.0   
 */
package com.cityoneyes.bean;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @ClassName: Area
 * @Description: 区表Bean
 * @author Rick
 * @date 2011-8-4 下午11:59:29
 */
@Entity
@Table(name="e_area")
public class Area implements Serializable {

	private static final long serialVersionUID = -3273403830269238999L;

	@Id 
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="id")
	private int id;
	@Column(name="name")
	private String name;
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "id", insertable = false, updatable = false)
	private City city;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public City getCity() {
		return city;
	}
	public void setCity(City city) {
		this.city = city;
	}
}
